home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / cc / gcc.info-4 (.txt) < prev    next >
GNU Info File  |  1993-10-21  |  41KB  |  772 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: RS/6000 and PowerPC Options,  Next: RT Options,  Prev: M88K Options,  Up: Submodel Options
  23. IBM RS/6000 and PowerPC Options
  24. -------------------------------
  25.    These `-m' options are defined for the IBM RS/6000 and PowerPC:
  26. `-mpower'
  27. `-mno-power'
  28. `-mpower2'
  29. `-mno-power2'
  30. `-mpowerpc'
  31. `-mno-powerpc'
  32. `-mpowerpcsqr'
  33. `-mno-powerpcsqr'
  34. `-mpowerpc64'
  35. `-mno-powerpc64'
  36.      GNU CC supports two related instruction set architectures for the
  37.      RS/6000 and PowerPC.  The "POWER" instruction set are those
  38.      instructions supported by the `rios' chip set used in the original
  39.      RS/6000 systems and the "PowerPC" instruction set is the
  40.      architecture of the Motorola MPC6xx microprocessors.  The PowerPC
  41.      architecture defines 64-bit instructions, but they are not
  42.      supported by any current processors.
  43.      Neither architecture is a subset of the other.  However there is a
  44.      large common subset of instructions supported by both.  An MQ
  45.      register is included in processors supporting the POWER
  46.      architecture.
  47.      You use these options to specify which instructions are available
  48.      on the processor you are using.  The default value of these
  49.      options is determined when configuring GNU CC.  Specifying the
  50.      `-mcpu=CPU_TYPE' overrides the specification of these options.  We
  51.      recommend you use that option rather than these.
  52.      The `-mpower' option allows GNU CC to generate instructions that
  53.      are found only in the POWER architecture and to use the MQ
  54.      register.  Specifying `-mpower2' implies `-power' and also allows
  55.      GNU CC to generate instructions that are present in the POWER2
  56.      architecture but not the original POWER architecture.
  57.      The `-mpowerpc' option allows GNU CC to generate instructions that
  58.      are found only in the 32-bit subset of the PowerPC architecture.
  59.      Specifying `-mpowerpcsqr' implies `-mpowerpc' and also allows GNU
  60.      CC to use the floating point square root instructions in the
  61.      PowerPC architecture but not in its first implementation.
  62.      Likewise, specifying `-mpowerpc64' implies `-mpowerpc' and also
  63.      allows GNU CC to use the 64-bit instructions in the PowerPC
  64.      architecture.
  65.      If you specify both `-mno-power' and `-mno-powerpc', GNU CC will
  66.      use only the instructions in the common subset of both
  67.      architectures and will not use the MQ register.  Specifying both
  68.      `-mpower' and `-mpowerpc' permits GNU CC to use any instruction
  69.      from either architecture and to allow use of the MQ register;
  70.      specify this for the Motorola MPC601.
  71. `-mnew-mnemonics'
  72. `-mold-mnemonics'
  73.      Select the mnemonics for GNU CC to use in the generated assembler
  74.      code.  `-mnew-mnemonics' requests GNU CC to produce output that
  75.      uses the assembler mnemonics defined for the PowerPC architecture
  76.      and the `-mold-mnemonics' requests GNU CC to use the assembler
  77.      mnemonics defined for the POWER architecture.  Instructions
  78.      defined in only one architecture have only one mnemonic; GNU CC
  79.      uses that mnemonic irrespective of which of thse options is
  80.      specified.
  81.      PowerPC assemblers support both the old and new mnemonics, as will
  82.      later POWER assemblers.  Current POWER assemblers only support the
  83.      old mnemonics.  Specify `-mnew-mnemonics' if you have an assembler
  84.      that sypports them, otherwise specify `-mold-mnemonics'.
  85.      The default value of these options depends on how GNU CC was
  86.      configured.  Specifing `-mcpu=CPU_TYPE' sometimes overrides the
  87.      value of these option.  Unless you are building a cross-compiled,
  88.      you should normally not specify either `-mnew-mnemonics' or
  89.      `-mold-mnemonics', but should instead accept the default.
  90. `-mcpu=CPU_TYPE'
  91.      Set architecture type, register usage, choice of mnemonics, and
  92.      instruction scheduling parameters for machine type CPU_TYPE.  By
  93.      default, CPU_TYPE is the target system defined when GNU CC was
  94.      configured.  Supported values for CPU_TYPE are `rios1', `rios2',
  95.      `601', `603', `604', `620' and `all'.
  96.      Specifying `-mcpu=rios1' or `-mcpu=rios2' enables the `-mpower'
  97.      option and disables the `-mpowerpc' option, `-mcpu=601' enables
  98.      both the `-mpower' and `-mpowerpc' options, `-mcpu=603' and
  99.      `-mcpu=604' enable the `-mpowerpc' option and disables the
  100.      `-mpower' option, and `-mcpu=620' enables both the `-mpowerpc' and
  101.      `-mpowerpc64' options and also disables the `-mpower' option.
  102.      To generate code that will operate on all members of the RS/6000
  103.      and PowerPC family, specify `-mcpu=all'.  In that case, GNU CC will
  104.      only use instructions in the common subset and will not use the MQ
  105.      register.  The instruction scheduling parameters and choice of
  106.      mnemonics are not affected.
  107.      Specifying `-mcpu=601', `-mcpu=603', `-mcpu=604', or `-mcpu=620'
  108.      also enables the `new-mnemonics' option.
  109. `-mnormal-toc'
  110. `-mno-fp-in-toc'
  111. `-mminimal-toc'
  112.      Modify generation of the TOC (Table Of Contents), which is created
  113.      for every executable file.  The `-mnormal-toc' option is selected
  114.      by default.  In that case, GNU CC will allocate at least one TOC
  115.      entry for each unique non-automatic variable reference in your
  116.      program.  GNU CC will also place floating-point constants in the
  117.      TOC.  However, only 16K entries are available in the TOC.
  118.      If you receive a linker error message that says you have
  119.      overflowed the available TOC space, recompile your files with
  120.      either the `-mno-fp-in-toc' or `-mminimal-toc' options.
  121.      `-mno-fp-in-toc' prevents GNU CC from putting floating-point
  122.      constants in the TOC.  `-mminimal-toc' causes GNU CC to make only
  123.      one TOC entry for every file.  Using the `-minimal-toc' option
  124.      produces slightly slower and larger code than the `-mnormal-toc' or
  125.      `-mno-fp-in-toc' options.  If you use floating-point, try the
  126.      `-mno-fp-in-toc' option before you specify `-mminimal-toc'.
  127. File: gcc.info,  Node: RT Options,  Next: MIPS Options,  Prev: RS/6000 and PowerPC Options,  Up: Submodel Options
  128. IBM RT Options
  129. --------------
  130.    These `-m' options are defined for the IBM RT PC:
  131. `-min-line-mul'
  132.      Use an in-line code sequence for integer multiplies.  This is the
  133.      default.
  134. `-mcall-lib-mul'
  135.      Call `lmul$$' for integer multiples.
  136. `-mfull-fp-blocks'
  137.      Generate full-size floating point data blocks, including the
  138.      minimum amount of scratch space recommended by IBM.  This is the
  139.      default.
  140. `-mminimum-fp-blocks'
  141.      Do not include extra scratch space in floating point data blocks.
  142.      This results in smaller code, but slower execution, since scratch
  143.      space must be allocated dynamically.
  144. `-mfp-arg-in-fpregs'
  145.      Use a calling sequence incompatible with the IBM calling
  146.      convention in which floating point arguments are passed in
  147.      floating point registers.  Note that `varargs.h' and `stdargs.h'
  148.      will not work with floating point operands if this option is
  149.      specified.
  150. `-mfp-arg-in-gregs'
  151.      Use the normal calling convention for floating point arguments.
  152.      This is the default.
  153. `-mhc-struct-return'
  154.      Return structures of more than one word in memory, rather than in a
  155.      register.  This provides compatibility with the MetaWare HighC (hc)
  156.      compiler.  Use the option `-fpcc-struct-return' for compatibility
  157.      with the Portable C Compiler (pcc).
  158. `-mnohc-struct-return'
  159.      Return some structures of more than one word in registers, when
  160.      convenient.  This is the default.  For compatibility with the
  161.      IBM-supplied compilers, use the option `-fpcc-struct-return' or the
  162.      option `-mhc-struct-return'.
  163. File: gcc.info,  Node: MIPS Options,  Next: i386 Options,  Prev: RT Options,  Up: Submodel Options
  164. MIPS Options
  165. ------------
  166.    These `-m' options are defined for the MIPS family of computers:
  167. `-mcpu=CPU TYPE'
  168.      Assume the defaults for the machine type CPU TYPE when scheduling
  169.      instructions.  The default CPU TYPE is `default', which picks the
  170.      longest cycles times for any of the machines, in order that the
  171.      code run at reasonable rates on all MIPS cpu's.  Other choices for
  172.      CPU TYPE are `r2000', `r3000', `r4000', and `r6000'.  While
  173.      picking a specific CPU TYPE will schedule things appropriately for
  174.      that particular chip, the compiler will not generate any code that
  175.      does not meet level 1 of the MIPS ISA (instruction set
  176.      architecture) without the `-mips2' or `-mips3' switches being used.
  177. `-mips2'
  178.      Issue instructions from level 2 of the MIPS ISA (branch likely,
  179.      square root instructions).  The `-mcpu=r4000' or `-mcpu=r6000'
  180.      switch must be used in conjunction with `-mips2'.
  181. `-mips3'
  182.      Issue instructions from level 3 of the MIPS ISA (64 bit
  183.      instructions).  You must use the `-mcpu=r4000' switch along with
  184.      `-mips3'.
  185. `-mint64'
  186. `-mlong64'
  187. `-mlonglong128'
  188.      These options don't work at present.
  189. `-mmips-as'
  190.      Generate code for the MIPS assembler, and invoke `mips-tfile' to
  191.      add normal debug information.  This is the default for all
  192.      platforms except for the OSF/1 reference platform, using the
  193.      OSF/rose object format.  If the either of the `-gstabs' or
  194.      `-gstabs+' switches are used, the `mips-tfile' program will
  195.      encapsulate the stabs within MIPS ECOFF.
  196. `-mgas'
  197.      Generate code for the GNU assembler.  This is the default on the
  198.      OSF/1 reference platform, using the OSF/rose object format.
  199. `-mrnames'
  200. `-mno-rnames'
  201.      The `-mrnames' switch says to output code using the MIPS software
  202.      names for the registers, instead of the hardware names (ie, A0
  203.      instead of $4).  The GNU assembler does not support the `-mrnames'
  204.      switch, and the MIPS assembler will be instructed to run the MIPS
  205.      C preprocessor over the source file.  The `-mno-rnames' switch is
  206.      default.
  207. `-mgpopt'
  208. `-mno-gpopt'
  209.      The `-mgpopt' switch says to write all of the data declarations
  210.      before the instructions in the text section, this allows the MIPS
  211.      assembler to generate one word memory references instead of using
  212.      two words for short global or static data items.  This is on by
  213.      default if optimization is selected.
  214. `-mstats'
  215. `-mno-stats'
  216.      For each non-inline function processed, the `-mstats' switch
  217.      causes the compiler to emit one line to the standard error file to
  218.      print statistics about the program (number of registers saved,
  219.      stack size, etc.).
  220. `-mmemcpy'
  221. `-mno-memcpy'
  222.      The `-mmemcpy' switch makes all block moves call the appropriate
  223.      string function (`memcpy' or `bcopy') instead of possibly
  224.      generating inline code.
  225. `-mmips-tfile'
  226. `-mno-mips-tfile'
  227.      The `-mno-mips-tfile' switch causes the compiler not postprocess
  228.      the object file with the `mips-tfile' program, after the MIPS
  229.      assembler has generated it to add debug support.  If `mips-tfile'
  230.      is not run, then no local variables will be available to the
  231.      debugger.  In addition, `stage2' and `stage3' objects will have
  232.      the temporary file names passed to the assembler embedded in the
  233.      object file, which means the objects will not compare the same.
  234.      The `-mno-mips-tfile' switch should only be used when there are
  235.      bugs in the `mips-tfile' program that prevents compilation.
  236. `-msoft-float'
  237.      Generate output containing library calls for floating point.
  238.      *Warning:* the requisite libraries are not part of GNU CC.
  239.      Normally the facilities of the machine's usual C compiler are
  240.      used, but this can't be done directly in cross-compilation.  You
  241.      must make your own arrangements to provide suitable library
  242.      functions for cross-compilation.
  243. `-mhard-float'
  244.      Generate output containing floating point instructions.  This is
  245.      the default if you use the unmodified sources.
  246. `-mfp64'
  247.      Assume that the FR bit in the status word is on, and that there
  248.      are 32 64-bit floating point registers, instead of 32 32-bit
  249.      floating point registers.  You must also specify the `-mcpu=r4000'
  250.      and `-mips3' switches.
  251. `-mfp32'
  252.      Assume that there are 32 32-bit floating point registers.  This is
  253.      the default.
  254. `-mabicalls'
  255. `-mno-abicalls'
  256.      Emit (or do not emit) the pseudo operations `.abicalls',
  257.      `.cpload', and `.cprestore' that some System V.4 ports use for
  258.      position independent code.
  259. `-mlong-calls'
  260. `-mlong-calls'
  261.      Do all calls with the `JALR' instruction, which requires loading
  262.      up a function's address into a register before the call.  You need
  263.      to use this switch, if you call outside of the current 512
  264.      megabyte segment to functions that are not through pointers.
  265. `-mhalf-pic'
  266. `-mno-half-pic'
  267.      Put pointers to extern references into the data section and load
  268.      them up, rather than put the references in the text section.
  269. `-G NUM'
  270.      Put global and static items less than or equal to NUM bytes into
  271.      the small data or bss sections instead of the normal data or bss
  272.      section.  This allows the assembler to emit one word memory
  273.      reference instructions based on the global pointer (GP or $28),
  274.      instead of the normal two words used.  By default, NUM is 8 when
  275.      the MIPS assembler is used, and 0 when the GNU assembler is used.
  276.      The `-G NUM' switch is also passed to the assembler and linker.
  277.      All modules should be compiled with the same `-G NUM' value.
  278. `-nocpp'
  279.      Tell the MIPS assembler to not run it's preprocessor over user
  280.      assembler files (with a `.s' suffix) when assembling them.
  281.    These options are defined by the macro `TARGET_SWITCHES' in the
  282. machine description.  The default for the options is also defined by
  283. that macro, which enables you to change the defaults.
  284. File: gcc.info,  Node: i386 Options,  Next: HPPA Options,  Prev: MIPS Options,  Up: Submodel Options
  285. Intel 386 Options
  286. -----------------
  287.    These `-m' options are defined for the i386 family of computers:
  288. `-m486'
  289. `-mno-486'
  290.      Control whether or not code is optimized for a 486 instead of an
  291.      386.  Code generated for an 486 will run on a 386 and vice versa.
  292. `-msoft-float'
  293.      Generate output containing library calls for floating point.
  294.      *Warning:* the requisite libraries are not part of GNU CC.
  295.      Normally the facilities of the machine's usual C compiler are
  296.      used, but this can't be done directly in cross-compilation.  You
  297.      must make your own arrangements to provide suitable library
  298.      functions for cross-compilation.
  299.      On machines where a function returns floating point results in the
  300.      80387 register stack, some floating point opcodes may be emitted
  301.      even if `-msoft-float' is used.
  302. `-mno-fp-ret-in-387'
  303.      Do not use the FPU registers for return values of functions.
  304.      The usual calling convention has functions return values of types
  305.      `float' and `double' in an FPU register, even if there is no FPU.
  306.      The idea is that the operating system should emulate an FPU.
  307.      The option `-mno-fp-ret-in-387' causes such values to be returned
  308.      in ordinary CPU registers instead.
  309. File: gcc.info,  Node: HPPA Options,  Next: Intel 960 Options,  Prev: i386 Options,  Up: Submodel Options
  310. HPPA Options
  311. ------------
  312.    These `-m' options are defined for the HPPA family of computers:
  313. `-mpa-risc-1-0'
  314.      Generate code for a PA 1.0 processor.
  315. `-mpa-risc-1-1'
  316.      Generate code for a PA 1.1 processor.
  317. `-mlong-calls'
  318.      Generate code which allows calls to functions greater than 256k
  319.      away from the caller when the caller and callee are in the same
  320.      source file.  Do not turn this option on unless code refuses to
  321.      link with "branch out of range errors" from the linker.
  322. `-mdisable-fpregs'
  323.      Prevent floating point registers from being used in any manner.
  324.      This is necessary for compiling kernels which perform lazy context
  325.      switching of floating point registers.  If you use this option and
  326.      attempt to perform floating point operations, the compiler will
  327.      abort.
  328. `-mdisable-indexing'
  329.      Prevent the compiler from using indexing address modes.  This
  330.      avoids some rather obscure problems when compiling MIG generated
  331.      code under MACH.
  332. `-mtrailing-colon'
  333.      Add a colon to the end of label definitions (for ELF assemblers).
  334. File: gcc.info,  Node: Intel 960 Options,  Next: DEC Alpha Options,  Prev: HPPA Options,  Up: Submodel Options
  335. Intel 960 Options
  336. -----------------
  337.    These `-m' options are defined for the Intel 960 implementations:
  338. `-mCPU TYPE'
  339.      Assume the defaults for the machine type CPU TYPE for some of the
  340.      other options, including instruction scheduling, floating point
  341.      support, and addressing modes.  The choices for CPU TYPE are `ka',
  342.      `kb', `mc', `ca', `cf', `sa', and `sb'.  The default is `kb'.
  343. `-mnumerics'
  344. `-msoft-float'
  345.      The `-mnumerics' option indicates that the processor does support
  346.      floating-point instructions.  The `-msoft-float' option indicates
  347.      that floating-point support should not be assumed.
  348. `-mleaf-procedures'
  349. `-mno-leaf-procedures'
  350.      Do (or do not) attempt to alter leaf procedures to be callable
  351.      with the `bal' instruction as well as `call'.  This will result in
  352.      more efficient code for explicit calls when the `bal' instruction
  353.      can be substituted by the assembler or linker, but less efficient
  354.      code in other cases, such as calls via function pointers, or using
  355.      a linker that doesn't support this optimization.
  356. `-mtail-call'
  357. `-mno-tail-call'
  358.      Do (or do not) make additional attempts (beyond those of the
  359.      machine-independent portions of the compiler) to optimize
  360.      tail-recursive calls into branches.  You may not want to do this
  361.      because the detection of cases where this is not valid is not
  362.      totally complete.  The default is `-mno-tail-call'.
  363. `-mcomplex-addr'
  364. `-mno-complex-addr'
  365.      Assume (or do not assume) that the use of a complex addressing
  366.      mode is a win on this implementation of the i960.  Complex
  367.      addressing modes may not be worthwhile on the K-series, but they
  368.      definitely are on the C-series.  The default is currently
  369.      `-mcomplex-addr' for all processors except the CB and CC.
  370. `-mcode-align'
  371. `-mno-code-align'
  372.      Align code to 8-byte boundaries for faster fetching (or don't
  373.      bother).  Currently turned on by default for C-series
  374.      implementations only.
  375. `-mic-compat'
  376. `-mic2.0-compat'
  377. `-mic3.0-compat'
  378.      Enable compatibility with iC960 v2.0 or v3.0.
  379. `-masm-compat'
  380. `-mintel-asm'
  381.      Enable compatibility with the iC960 assembler.
  382. `-mstrict-align'
  383. `-mno-strict-align'
  384.      Do not permit (do permit) unaligned accesses.
  385. `-mold-align'
  386.      Enable structure-alignment compatibility with Intel's gcc release
  387.      version 1.3 (based on gcc 1.37).  Currently this is buggy in that
  388.      `#pragma align 1' is always assumed as well, and cannot be turned
  389.      off.
  390. File: gcc.info,  Node: DEC Alpha Options,  Next: Clipper Options,  Prev: Intel 960 Options,  Up: Submodel Options
  391. DEC Alpha Options
  392. -----------------
  393.    These `-m' options are defined for the DEC Alpha implementations:
  394. `-mno-soft-float'
  395. `-msoft-float'
  396.      Use (do not use) the hardware floating-point instructions for
  397.      floating-point operations.  When `-msoft-float' is specified,
  398.      functions in `libgcc1.c' will be used to perform floating-point
  399.      operations.  Unless they are replaced by routines that emulate the
  400.      floating-point operations, or compiled in such a way as to call
  401.      such emulations routines, these routines will issue floating-point
  402.      operations.   If you are compiling for an Alpha without
  403.      floating-point operations, you must ensure that the library is
  404.      built so as not to call them.
  405.      Note that Alpha implementations without floating-point operations
  406.      are required to have floating-point registers.
  407. `-mfp-reg'
  408. `-mno-fp-regs'
  409.      Generate code that uses (does not use) the floating-point register
  410.      set.  `-mno-fp-regs' implies `-msoft-float'.  If the floating-point
  411.      register set is not used, floating point operands are passed in
  412.      integer registers as if they were integers and floating-point
  413.      results are passed in $0 instead of $f0.  This is a non-standard
  414.      calling sequence, so any function with a floating-point argument
  415.      or return value called by code compiled with `-mno-fp-regs' must
  416.      also be compiled with that option.
  417.      A typical use of this option is building a kernel that does not
  418.      use, and hence need not save and restore, any floating-point
  419.      registers.
  420. File: gcc.info,  Node: Clipper Options,  Next: System V Options,  Prev: DEC Alpha Options,  Up: Submodel Options
  421. Clipper Options
  422. ---------------
  423.    These `-m' options are defined for the Clipper implementations:
  424. `-mc300'
  425.      Produce code for a C300 Clipper processor. This is the default.
  426. `-mc400'
  427.      Produce code for a C400 Clipper processor i.e. use floting point
  428.      registers f8..f15.
  429. File: gcc.info,  Node: System V Options,  Prev: Clipper Options,  Up: Submodel Options
  430. Options for System V
  431. --------------------
  432.    These additional options are available on System V Release 4 for
  433. compatibility with other compilers on those systems:
  434. `-Qy'
  435.      Identify the versions of each tool used by the compiler, in a
  436.      `.ident' assembler directive in the output.
  437. `-Qn'
  438.      Refrain from adding `.ident' directives to the output file (this is
  439.      the default).
  440. `-YP,DIRS'
  441.      Search the directories DIRS, and no others, for libraries
  442.      specified with `-l'.
  443. `-Ym,DIR'
  444.      Look in the directory DIR to find the M4 preprocessor.  The
  445.      assembler uses this option.
  446. File: gcc.info,  Node: Code Gen Options,  Next: Environment Variables,  Prev: Submodel Options,  Up: Invoking GCC
  447. Options for Code Generation Conventions
  448. =======================================
  449.    These machine-independent options control the interface conventions
  450. used in code generation.
  451.    Most of them have both positive and negative forms; the negative form
  452. of `-ffoo' would be `-fno-foo'.  In the table below, only one of the
  453. forms is listed--the one which is not the default.  You can figure out
  454. the other form by either removing `no-' or adding it.
  455. `-fpcc-struct-return'
  456.      Return "short" `struct' and `union' values in memory like longer
  457.      ones, rather than in registers.  This convention is less
  458.      efficient, but it has the advantage of allowing intercallability
  459.      between GNU CC-compiled files and files compiled with other
  460.      compilers.
  461.      The precise convention for returning structures in memory depends
  462.      on the target configuration macros.
  463.      Short structures and unions are those whose size and alignment
  464.      match that of some integer type.
  465. `-freg-struct-return'
  466.      Use the convention that `struct' and `union' values are returned
  467.      in registers when possible.  This is more efficient for small
  468.      structures than `-fpcc-struct-return'.
  469.      If you specify neither `-fpcc-struct-return' nor its contrary
  470.      `-freg-struct-return', GNU CC defaults to whichever convention is
  471.      standard for the target.  If there is no standard convention, GNU
  472.      CC defaults to `-fpcc-struct-return', except on targets where GNU
  473.      CC is the principal compiler.  In those cases, we can choose the
  474.      standard, and we chose the more efficient register return
  475.      alternative.
  476. `-fshort-enums'
  477.      Allocate to an `enum' type only as many bytes as it needs for the
  478.      declared range of possible values.  Specifically, the `enum' type
  479.      will be equivalent to the smallest integer type which has enough
  480.      room.
  481. `-fshort-double'
  482.      Use the same size for `double' as for `float'.
  483. `-fshared-data'
  484.      Requests that the data and non-`const' variables of this
  485.      compilation be shared data rather than private data.  The
  486.      distinction makes sense only on certain operating systems, where
  487.      shared data is shared between processes running the same program,
  488.      while private data exists in one copy per process.
  489. `-fno-common'
  490.      Allocate even uninitialized global variables in the bss section of
  491.      the object file, rather than generating them as common blocks.
  492.      This has the effect that if the same variable is declared (without
  493.      `extern') in two different compilations, you will get an error
  494.      when you link them.  The only reason this might be useful is if
  495.      you wish to verify that the program will work on other systems
  496.      which always work this way.
  497. `-fno-ident'
  498.      Ignore the `#ident' directive.
  499. `-fno-gnu-linker'
  500.      Do not output global initializations (such as C++ constructors and
  501.      destructors) in the form used by the GNU linker (on systems where
  502.      the GNU linker is the standard method of handling them).  Use this
  503.      option when you want to use a non-GNU linker, which also requires
  504.      using the `collect2' program to make sure the system linker
  505.      includes constructors and destructors.  (`collect2' is included in
  506.      the GNU CC distribution.)  For systems which *must* use
  507.      `collect2', the compiler driver `gcc' is configured to do this
  508.      automatically.
  509. `-finhibit-size-directive'
  510.      Don't output a `.size' assembler directive, or anything else that
  511.      would cause trouble if the function is split in the middle, and the
  512.      two halves are placed at locations far apart in memory.  This
  513.      option is used when compiling `crtstuff.c'; you should not need to
  514.      use it for anything else.
  515. `-fverbose-asm'
  516.      Put extra commentary information in the generated assembly code to
  517.      make it more readable.  This option is generally only of use to
  518.      those who actually need to read the generated assembly code
  519.      (perhaps while debugging the compiler itself).
  520. `-fvolatile'
  521.      Consider all memory references through pointers to be volatile.
  522. `-fvolatile-global'
  523.      Consider all memory references to extern and global data items to
  524.      be volatile.
  525. `-fpic'
  526.      Generate position-independent code (PIC) suitable for use in a
  527.      shared library, if supported for the target machine.  Such code
  528.      accesses all constant addresses through a global offset table
  529.      (GOT).  If the GOT size for the linked executable exceeds a
  530.      machine-specific maximum size, you get an error message from the
  531.      linker indicating that `-fpic' does not work; in that case,
  532.      recompile with `-fPIC' instead.  (These maximums are 16k on the
  533.      m88k, 8k on the Sparc, and 32k on the m68k and RS/6000.  The 386
  534.      has no such limit.)
  535.      Position-independent code requires special support, and therefore
  536.      works only on certain machines.  For the 386, GNU CC supports PIC
  537.      for System V but not for the Sun 386i.  Code generated for the IBM
  538.      RS/6000 is always position-independent.
  539.      The GNU assembler does not fully support PIC.  Currently, you must
  540.      use some other assembler in order for PIC to work.  We would
  541.      welcome volunteers to upgrade GAS to handle this; the first part
  542.      of the job is to figure out what the assembler must do differently.
  543. `-fPIC'
  544.      If supported for the target machine, emit position-independent
  545.      code, suitable for dynamic linking and avoiding any limit on the
  546.      size of the global offset table.  This option makes a difference
  547.      on the m68k, m88k and the Sparc.
  548.      Position-independent code requires special support, and therefore
  549.      works only on certain machines.
  550. `-ffixed-REG'
  551.      Treat the register named REG as a fixed register; generated code
  552.      should never refer to it (except perhaps as a stack pointer, frame
  553.      pointer or in some other fixed role).
  554.      REG must be the name of a register.  The register names accepted
  555.      are machine-specific and are defined in the `REGISTER_NAMES' macro
  556.      in the machine description macro file.
  557.      This flag does not have a negative form, because it specifies a
  558.      three-way choice.
  559. `-fcall-used-REG'
  560.      Treat the register named REG as an allocatable register that is
  561.      clobbered by function calls.  It may be allocated for temporaries
  562.      or variables that do not live across a call.  Functions compiled
  563.      this way will not save and restore the register REG.
  564.      Use of this flag for a register that has a fixed pervasive role in
  565.      the machine's execution model, such as the stack pointer or frame
  566.      pointer, will produce disastrous results.
  567.      This flag does not have a negative form, because it specifies a
  568.      three-way choice.
  569. `-fcall-saved-REG'
  570.      Treat the register named REG as an allocatable register saved by
  571.      functions.  It may be allocated even for temporaries or variables
  572.      that live across a call.  Functions compiled this way will save
  573.      and restore the register REG if they use it.
  574.      Use of this flag for a register that has a fixed pervasive role in
  575.      the machine's execution model, such as the stack pointer or frame
  576.      pointer, will produce disastrous results.
  577.      A different sort of disaster will result from the use of this flag
  578.      for a register in which function values may be returned.
  579.      This flag does not have a negative form, because it specifies a
  580.      three-way choice.
  581. `+e0'
  582. `+e1'
  583.      Control whether virtual function definitions in classes are used to
  584.      generate code, or only to define interfaces for their callers.
  585.      (C++ only).
  586.      These options are provided for compatibility with `cfront' 1.x
  587.      usage; the recommended alternative GNU C++ usage is in flux.
  588.      *Note Declarations and Definitions in One Header: C++ Interface.
  589.      With `+e0', virtual function definitions in classes are declared
  590.      `extern'; the declaration is used only as an interface
  591.      specification, not to generate code for the virtual functions (in
  592.      this compilation).
  593.      With `+e1', G++ actually generates the code implementing virtual
  594.      functions defined in the code, and makes them publicly visible.
  595. File: gcc.info,  Node: Environment Variables,  Next: Running Protoize,  Prev: Code Gen Options,  Up: Invoking GCC
  596. Environment Variables Affecting GNU CC
  597. ======================================
  598.    This section describes several environment variables that affect how
  599. GNU CC operates.  They work by specifying directories or prefixes to use
  600. when searching for various kinds of files.
  601.    Note that you can also specify places to search using options such as
  602. `-B', `-I' and `-L' (*note Directory Options::.).  These take
  603. precedence over places specified using environment variables, which in
  604. turn take precedence over those specified by the configuration of GNU
  605. CC.  *Note Driver::.
  606. `TMPDIR'
  607.      If `TMPDIR' is set, it specifies the directory to use for temporary
  608.      files.  GNU CC uses temporary files to hold the output of one
  609.      stage of compilation which is to be used as input to the next
  610.      stage: for example, the output of the preprocessor, which is the
  611.      input to the compiler proper.
  612. `GCC_EXEC_PREFIX'
  613.      If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
  614.      names of the subprograms executed by the compiler.  No slash is
  615.      added when this prefix is combined with the name of a subprogram,
  616.      but you can specify a prefix that ends with a slash if you wish.
  617.      If GNU CC cannot find the subprogram using the specified prefix, it
  618.      tries looking in the usual places for the subprogram.
  619.      Other prefixes specified with `-B' take precedence over this
  620.      prefix.
  621.      This prefix is also used for finding files such as `crt0.o' that
  622.      are used for linking.
  623.      In addition, the prefix is used in an unusual way in finding the
  624.      directories to search for header files.  For each of the standard
  625.      directories whose name normally begins with
  626.      `/usr/local/lib/gcc-lib' (more precisely, with the value of
  627.      `GCC_INCLUDE_DIR'), GNU CC tries replacing that beginning with the
  628.      specified prefix to produce an alternate directory name.  Thus,
  629.      with `-Bfoo/', GNU CC will search `foo/bar' where it would
  630.      normally search `/usr/local/lib/bar'.  These alternate directories
  631.      are searched first; the standard directories come next.
  632. `COMPILER_PATH'
  633.      The value of `COMPILER_PATH' is a colon-separated list of
  634.      directories, much like `PATH'.  GNU CC tries the directories thus
  635.      specified when searching for subprograms, if it can't find the
  636.      subprograms using `GCC_EXEC_PREFIX'.
  637. `LIBRARY_PATH'
  638.      The value of `LIBRARY_PATH' is a colon-separated list of
  639.      directories, much like `PATH'.  GNU CC tries the directories thus
  640.      specified when searching for special linker files, if it can't
  641.      find them using `GCC_EXEC_PREFIX'.  Linking using GNU CC also uses
  642.      these directories when searching for ordinary libraries for the
  643.      `-l' option (but directories specified with `-L' come first).
  644. `C_INCLUDE_PATH'
  645. `CPLUS_INCLUDE_PATH'
  646. `OBJC_INCLUDE_PATH'
  647.      These environment variables pertain to particular languages.  Each
  648.      variable's value is a colon-separated list of directories, much
  649.      like `PATH'.  When GNU CC searches for header files, it tries the
  650.      directories listed in the variable for the language you are using,
  651.      after the directories specified with `-I' but before the standard
  652.      header file directories.
  653. `DEPENDENCIES_OUTPUT'
  654.      If this variable is set, its value specifies how to output
  655.      dependencies for Make based on the header files processed by the
  656.      compiler.  This output looks much like the output from the `-M'
  657.      option (*note Preprocessor Options::.), but it goes to a separate
  658.      file, and is in addition to the usual results of compilation.
  659.      The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
  660.      which case the Make rules are written to that file, guessing the
  661.      target name from the source file name.  Or the value can have the
  662.      form `FILE TARGET', in which case the rules are written to file
  663.      FILE using TARGET as the target name.
  664. File: gcc.info,  Node: Running Protoize,  Prev: Environment Variables,  Up: Invoking GCC
  665. Running Protoize
  666. ================
  667.    The program `protoize' is an optional part of GNU C.  You can use it
  668. to add prototypes to a program, thus converting the program to ANSI C
  669. in one respect.  The companion program `unprotoize' does the reverse:
  670. it removes argument types from any prototypes that are found.
  671.    When you run these programs, you must specify a set of source files
  672. as command line arguments.  The conversion programs start out by
  673. compiling these files to see what functions they define.  The
  674. information gathered about a file FOO is saved in a file named `FOO.X'.
  675.    After scanning comes actual conversion.  The specified files are all
  676. eligible to be converted; any files they include (whether sources or
  677. just headers) are eligible as well.
  678.    But not all the eligible files are converted.  By default,
  679. `protoize' and `unprotoize' convert only source and header files in the
  680. current directory.  You can specify additional directories whose files
  681. should be converted with the `-d DIRECTORY' option.  You can also
  682. specify particular files to exclude with the `-x FILE' option.  A file
  683. is converted if it is eligible, its directory name matches one of the
  684. specified directory names, and its name within the directory has not
  685. been excluded.
  686.    Basic conversion with `protoize' consists of rewriting most function
  687. definitions and function declarations to specify the types of the
  688. arguments.  The only ones not rewritten are those for varargs functions.
  689.    `protoize' optionally inserts prototype declarations at the
  690. beginning of the source file, to make them available for any calls that
  691. precede the function's definition.  Or it can insert prototype
  692. declarations with block scope in the blocks where undeclared functions
  693. are called.
  694.    Basic conversion with `unprotoize' consists of rewriting most
  695. function declarations to remove any argument types, and rewriting
  696. function definitions to the old-style pre-ANSI form.
  697.    Both conversion programs print a warning for any function
  698. declaration or definition that they can't convert.  You can suppress
  699. these warnings with `-q'.
  700.    The output from `protoize' or `unprotoize' replaces the original
  701. source file.  The original file is renamed to a name ending with
  702. `.save'.  If the `.save' file already exists, then the source file is
  703. simply discarded.
  704.    `protoize' and `unprotoize' both depend on GNU CC itself to scan the
  705. program and collect information about the functions it uses.  So
  706. neither of these programs will work until GNU CC is installed.
  707.    Here is a table of the options you can use with `protoize' and
  708. `unprotoize'.  Each option works with both programs unless otherwise
  709. stated.
  710. `-B DIRECTORY'
  711.      Look for the file `SYSCALLS.c.X' in DIRECTORY, instead of the
  712.      usual directory (normally `/usr/local/lib').  This file contains
  713.      prototype information about standard system functions.  This option
  714.      applies only to `protoize'.
  715. `-c COMPILATION-OPTIONS'
  716.      Use  COMPILATION-OPTIONS as the options when running `gcc' to
  717.      produce the `.X' files.  The special option `-aux-info' is always
  718.      passed in addition, to tell `gcc' to write a `.X' file.
  719.      Note that the compilation options must be given as a single
  720.      argument to `protoize' or `unprotoize'.  If you want to specify
  721.      several `gcc' options, you must quote the entire set of
  722.      compilation options to make them a single word in the shell.
  723.      There are certain `gcc' arguments that you cannot use, because they
  724.      would produce the wrong kind of output.  These include `-g', `-O',
  725.      `-c', `-S', and `-o' If you include these in the
  726.      COMPILATION-OPTIONS, they are ignored.
  727.      Rename files to end in `.C' instead of `.c'.  This is convenient
  728.      if you are converting a C program to C++.  This option applies
  729.      only to `protoize'.
  730.      Add explicit global declarations.  This means inserting explicit
  731.      declarations at the beginning of each source file for each function
  732.      that is called in the file and was not declared.  These
  733.      declarations precede the first function definition that contains a
  734.      call to an undeclared function.  This option applies only to
  735.      `protoize'.
  736. `-i STRING'
  737.      Indent old-style parameter declarations with the string STRING.
  738.      This option applies only to `protoize'.
  739.      `unprotoize' converts prototyped function definitions to old-style
  740.      function definitions, where the arguments are declared between the
  741.      argument list and the initial `{'.  By default, `unprotoize' uses
  742.      five spaces as the indentation.  If you want to indent with just
  743.      one space instead, use `-i " "'.
  744.      Keep the `.X' files.  Normally, they are deleted after conversion
  745.      is finished.
  746.      Add explicit local declarations.  `protoize' with `-l' inserts a
  747.      prototype declaration for each function in each block which calls
  748.      the function without any declaration.  This option applies only to
  749.      `protoize'.
  750.      Make no real changes.  This mode just prints information about the
  751.      conversions that would have been done without `-n'.
  752.      Make no `.save' files.  The original files are simply deleted.
  753.      Use this option with caution.
  754. `-p PROGRAM'
  755.      Use the program PROGRAM as the compiler.  Normally, the name `gcc'
  756.      is used.
  757.      Work quietly.  Most warnings are suppressed.
  758.      Print the version number, just like `-v' for `gcc'.
  759.    If you need special compiler options to compile one of your program's
  760. source files, then you should generate that file's `.X' file specially,
  761. by running `gcc' on that source file with the appropriate options and
  762. the option `-aux-info'.  Then run `protoize' on the entire set of
  763. files.  `protoize' will use the existing `.X' file because it is newer
  764. than the source file.  For example:
  765.      gcc -Dfoo=bar file1.c -aux-info
  766.      protoize *.c
  767. You need to include the special files along with the rest in the
  768. `protoize' command, even though their `.X' files already exist, because
  769. otherwise they won't get converted.
  770.    *Note Protoize Caveats::, for more information on how to use
  771. `protoize' successfully.
  772.